package com.tree.userservice.sao;

import com.tree.userservice.config.FullLogConfiguration;
import com.tree.userservice.sao.dto.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * package com.tree.userservice.sao
 * description:
 *
 * @author tree
 * @date 2019-09-04 17:45
 */
@FeignClient(value = ServiceConstants.USER_SERVICE, fallbackFactory = UserFeignServiceFallbackFactory.class
    , configuration = FullLogConfiguration.class,primary = true)
public interface UserFeignService {
    @GetMapping("/user/index")
    String index();

    @GetMapping("/user/hello/{name}/{age}")
    User hello(@RequestHeader Integer id , @PathVariable String name, @PathVariable Integer age);

    @PostMapping("/user/hello2")
    String hello2(@RequestBody User user);

    @GetMapping("/user/time")
     String time();

    @GetMapping("/user/longtime")
    String longTime();

    @GetMapping("/user/randomtime")
    String randomTime();


}